<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人贷款页面</title>
<meta name="Keywords" content="一起好 用户中心" />
    <meta name="Description" content="一起好 用户中心" />
    <script src="js/ops.js" type="text/javascript"></script>
    <link href="css/UserCSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="row" style="margin-top: 10px;">
    </div>
    <div class="row">
        <div class="u-menu">
            <ul class="u-nav" id="user_menu">
                <li class="item" id="user_menu_my" name="user_menu_my">
                    <h3 class="t1">
                               我的个人中心<span title="折叠"></span></h3>
                    <ul class="sub">
                        <li><a href="个人资料.jsp">个人资料</a></li><li><a href="认证管理.jsp">
                            认证管理</a></li><li><a href="密码管理.jsp">密码设置</a></li></ul>
                </li>         
                <li class="item" id="user_menu_loan" name="user_menu_loan">
                    <h3 class="t3">
                        贷款管理<a name="user_login"></a><span title="折叠"></span></h3>
                    <ul class="sub">
                            <li><a href="queryRetmsgInfo.do">我的贷款</a></li><li><a href="queryRepaymentInfo.do?nper=${Nper }">偿还贷款</a></li><li><a href="LoanStatistics.do">
                            贷款统计</a></li></ul>
                </li>
            </ul>
            <script type="text/javascript">
                var menuClosed = Ops.getCookie('menuClosed');

                $(".item h3 span").click(function () {

                    menuClosed = Ops.getCookie('menuClosed');
                    if (menuClosed == undefined || menuClosed == null) {
                        menuClosed = '';
                        Ops.setCookie('menuClosed', menuClosed);
                    }
                    //console.log(menuClosed+',click;;;');	
                    $(this).parent().parent().toggleClass('bg-slide');
                    $(this).parent().parent().find(".sub").slideToggle('fast');

                    if ($(this).attr('title') == '折叠') {
                        $(this).attr('title', '展开');
                    } else {
                        $(this).attr('title', '折叠');
                    }

                    var pid = $(this).parent().parent().attr('id');

                    if ($(this).parent().parent().hasClass('bg-slide') && menuClosed.indexOf("#" + pid + "#") == -1) {
                        var cookies = menuClosed + '#' + pid + '#';
                    } else {
                        var cookies = menuClosed.replace("#" + pid + "#", '');
                    }
                    Ops.setCookie('menuClosed', cookies);
                });

                if (menuClosed != null) {
                    var closedMatch = menuClosed.match(/([a-z_]+)/g);
                    for (var i in closedMatch) {
                        var idObj = $('#' + closedMatch[i]);
                        idObj.toggleClass('bg-slide');
                        idObj.find(".sub").hide();
                        idObj.find('h3 span').attr('title', '展开');
                    }
                } else {
                    $("#user_menu_loan h3 span").click();
                }
            </script>
        </div>
        <!-- /.u-menu -->
        <div class="u-main">
            <script src="/public/hao/js/user/loan.js"></script>
            <div class="u-tab-wrap">
                <ul class="u-tab clearfix">
                    <li class="current"><a>我的贷款</a></li>
                </ul>
            </div>
            <div class="u-form-wrap" style="padding: 20px;">
                <div class="page-wrap">
                  <h3> 这里是贷款列表</h3>
                           <table class="u-table th12 td12">
                        <tr>
                            <th width="10%">
                                编号
                            </th>
                            <th width="25%">
                              还款时间
                            </th>
                            <th width="10%">
                                还款类型
                            </th>
                            <th width="8%">
                                贷款编号
                            </th>
                            <th width="8%">
                                还款流水
                            </th>
                            <th width="10%">
                                还款金额
                            </th>
                            <th width="10%">
                                还款期数
                            </th>
               <!--              <th width="10%">
                                操作
                            </th> -->
                        </tr>
                <c:forEach items="${rtList }" var="rt" varStatus="index">
                 <tr>
               			<td>${index.index+1 }</td>
               			<td><fmt:formatDate value="${rt.ret_date }"/></td>
               				<td>		<c:forEach items="${fq}" var="f">
	                                		<c:if test="${f.fid eq rt.ret_type}">
	                                				${f.tname}<br/>${f.qishu }期
	                                		</c:if>	
                                	</c:forEach>
                              </td>  	
               			<%-- <td>${rt.ret_type }</td> --%>
               			<td>${rt.ret_num }</td>
               			<td>${rt.ret_water }</td>
               			<td>${rt.ret_money }</td>
                		<td>${rt.nper }</td>               		
                		</tr>
                </c:forEach>      
                    </table>   
                </div>
                <div class="i-item-btn" style="height: 28px;">
                    <a href="queryRepaymentInfo.do"  class="i-btn-txt1 repay-back">还 款</a></div>
            	</div>
            <!-- /.u-form-wrap -->
        </div>
        <!-- /.u-main -->
    </div>
</body>
</html>
